package com.lmx.project.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lmx.project.common.PageRequest;
import com.lmx.project.model.dto.studyrecords.StudyrecordsAddRequest;
import com.lmx.project.model.dto.studyrecords.StudyrecordsQueryRequest;
import com.lmx.project.model.entity.Studyrecords;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lmx.project.model.vo.studyRecord.StudyrecordsShareVO;
import com.lmx.project.model.vo.studyRecord.StudyrecordsVo;

import javax.servlet.http.HttpServletRequest;

/**
* @author Lenovo
* @description 针对表【studyRecords(学习记录表)】的数据库操作Service
* @createDate 2023-04-07 22:36:34
*/
public interface StudyrecordsService extends IService<Studyrecords> {


    /**
     *
     * 实现多条件查询
     * */
    Page<StudyrecordsVo> getstudurecordsByCondition(StudyrecordsQueryRequest studyrecordsQueryRequest);

    /**
     * 增加提交记录
     * @param studyrecordsAddRequest
     * @param request
     * @return
     */
    Long addRecord(StudyrecordsAddRequest studyrecordsAddRequest, HttpServletRequest request);

    /**
     * 判断今日是否已提交
     * @param request
     * @return
     */
    String isCommit(HttpServletRequest request);

    /**
     * 删除记录
     * @param id
     * @param request
     * @return
     */
    Boolean removeRecord(Long id, HttpServletRequest request);

    /**
     * 获取学习记录
     * @param pageRequest
     * @return
     */
    Page<StudyrecordsShareVO> getShareRecordVo(PageRequest pageRequest);
}
